package cn.edu.wfit.modules.directionmanagement.service.impl;

import java.util.List;
import cn.edu.wfit.common.core.utils.DateUtils;
import cn.edu.wfit.modules.directionmanagement.domain.WfitLog;
import cn.edu.wfit.modules.directionmanagement.mapper.WfitLogMapper;
import cn.edu.wfit.modules.directionmanagement.service.IWfitLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-03
 */
@Service
public class WfitLogServiceImpl implements IWfitLogService
{
    @Autowired
    private WfitLogMapper wfitLogMapper;

    /**
     * 查询日志
     * 
     * @param id 日志主键
     * @return 日志
     */
    @Override
    public WfitLog selectWfitLogById(Long id)
    {
        return wfitLogMapper.selectWfitLogById(id);
    }

    /**
     * 查询日志列表
     * 
     * @param wfitLog 日志
     * @return 日志
     */
    @Override
    public List<WfitLog> selectWfitLogList(WfitLog wfitLog)
    {
        return wfitLogMapper.selectWfitLogList(wfitLog);
    }

    /**
     * 新增日志
     * 
     * @param wfitLog 日志
     * @return 结果
     */
    @Override
    public int insertWfitLog(WfitLog wfitLog)
    {
//        wfitLog.setCreateTime(DateUtils.getNowDate());
        return wfitLogMapper.insertWfitLog(wfitLog);
    }

    /**
     * 修改日志
     * 
     * @param wfitLog 日志
     * @return 结果
     */
    @Override
    public int updateWfitLog(WfitLog wfitLog)
    {
        return wfitLogMapper.updateWfitLog(wfitLog);
    }

    /**
     * 批量删除日志
     * 
     * @param ids 需要删除的日志主键
     * @return 结果
     */
    @Override
    public int deleteWfitLogByIds(Long[] ids)
    {
        return wfitLogMapper.deleteWfitLogByIds(ids);
    }

    /**
     * 删除日志信息
     * 
     * @param id 日志主键
     * @return 结果
     */
    @Override
    public int deleteWfitLogById(Long id)
    {
        return wfitLogMapper.deleteWfitLogById(id);
    }
}
